package com.it.water.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * 监控事件实体类
 *
 * @author <a href="mailto:2038322151@qq.com">Miraitowa_zcx</a>
 * @author HelloWorld505
 * @version 1.0
 * @since 2024-03-18
 */
@Data
@TableName("monitoring_events")
public class MonitoringEvents implements Serializable {

    /**
     * 序列化ID
     */
    private static final long serialVersionUID = 1L;

    /**
     * 设备ID
     */
    @TableId("id")
    private Integer id;

    /**
     * 事件ID
     */
    @TableField("eventid")
    private Integer eventid;

    /**
     * 事件类型
     */
    @TableField("eventtype")
    private String eventtype;

    /**
     * 事件描述
     */
    @TableField("description")
    private String description;

    /**
     * 事件时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp createtime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp updatetime;
}
